/* 相关问题样式 */

.sidebar-relations-list {
    max-height: 300px;
    overflow-y: auto;
}

.sidebar-relation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-relation-item:last-child {
    border-bottom: none;
}

.relation-info {
    width: 200px;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.relation-type-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    min-width: 40px;
    text-align: center;
}

.relation-issue-link {
    color: #555;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.relation-issue-link:hover {
    color: #1890ff;
    text-decoration: none;
}

.relation-issue-subject {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.relation-actions {
    flex-shrink: 0;
}

/* 关联类型标签样式 */

/* .label-warning {
    background-color: #ffc107;
    color: #212529;
}
.label-danger {
    background-color: #dc3545;
}
.label-info {
    background-color: #17a2b8;
}
.label-success {
    background-color: #28a745;
} */

/* 滚动条样式 */
.sidebar-relations-list::-webkit-scrollbar {
    width: 4px;
}

.sidebar-relations-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.sidebar-relations-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.sidebar-relations-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 关联问题表格样式 */
.relation-issues-wrapper {
    margin: 10px 20px 0 20px;
    padding: 0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.relation-issues-wrapper .list.issues {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 4px;
    font-size: 13px;
}

.relation-issues-wrapper .list.issues tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f5f5f5;
}

.relation-issues-wrapper .list.issues tbody tr:last-child {
    border-bottom: none;
}

.relation-issues-wrapper .list.issues tbody tr:hover {
    background-color: #f8f9fa;
}

.relation-issues-wrapper .list.issues td {
    padding: 10px 0 10px 10px;
    vertical-align: middle;
    line-height: 1.4;
}

.relation-issues-wrapper .list.issues td.checkbox {
    width: 30px;
    text-align: center;
}

.relation-issues-wrapper .list.issues td.checkbox input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.relation-issues-wrapper .list.issues td.subject {
    font-weight: 500;
    color: #333;
    min-width: 250px;
}

.relation-issues-wrapper .list.issues td.subject a {
    color: #1890ff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.relation-issues-wrapper .list.issues td.subject a:hover {
    color: #40a9ff;
    text-decoration: underline;
}

.relation-issues-wrapper .list.issues td.status {
    font-size: 12px;
    color: #666;
    text-align: center;
    min-width: 80px;
}

.relation-issues-wrapper .list.issues td.assigned_to {
    font-size: 12px;
    color: #666;
    min-width: 100px;
}

.relation-issues-wrapper .list.issues td.start_date,
.relation-issues-wrapper .list.issues td.due_date {
    font-size: 12px;
    color: #666;
    text-align: center;
    min-width: 80px;
    white-space: nowrap;
}

.relation-issues-wrapper .list.issues td.done_ratio {
    min-width: 120px;
}

.relation-issues-wrapper .list.issues .progress {
    height: 16px;
    margin: 3px 0;
    border-radius: 3px;
    background-color: #f5f5f5;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.relation-issues-wrapper .list.issues .progress .closed {
    border-radius: 3px 0 0 3px;
}

.relation-issues-wrapper .list.issues .progress .closed[title="40%"] {
    background-color: #5cb85c;
}

.relation-issues-wrapper .list.issues .progress .todo {
    border-radius: 0 3px 3px 0;
}

.relation-issues-wrapper .list.issues td.buttons {
    width: 50px;
    text-align: center;
}

.relation-issues-wrapper .list.issues td.buttons a {
    display: inline-block;
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.relation-issues-wrapper .list.issues td.buttons a:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .relation-issues-wrapper .list.issues {
        font-size: 12px;
    }
    
    .relation-issues-wrapper .list.issues td {
        padding: 8px 5px;
    }
    
    .relation-issues-wrapper .list.issues td.subject {
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .relation-issues-wrapper .list.issues .assigned_to,
    .relation-issues-wrapper .list.issues .start_date,
    .relation-issues-wrapper .list.issues .due_date {
        display: none;
    }
    
    .relation-issues-wrapper .list.issues .subject {
        min-width: 150px;
    }
}